using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using ECommerce.Library.Web;

/// <summary>
/// Summary description for BasePage
/// </summary>
/// 

namespace ECommerce.Library.Web
{
    public class BasePage : System.Web.UI.Page
    {
        protected static string _siteName = string.Empty;
        protected static SiteConfigSection _configSection = null;
        protected string _loadMessage = string.Empty;
        private const int DEFAULT_SETTING_ID = 1;

        public static SiteConfigSection ConfigSection
        {
            get
            {
                if (_configSection == null)
                    _configSection = SiteConfigSection.SiteConfiguration;

                return _configSection;
            }
        }

        public string ResponseMessage
        {
            set 
            {
                BaseMaster baseMaster = (BaseMaster)this.Master;
                baseMaster.ResponseMessage = value;
            }
        }

        public string LoadMessage
        {
            get { return this._loadMessage; }
            set { this._loadMessage = value; }
        }

        public BasePage() 
        {
            SetTitle();
        }

        protected void SetTitle()
        {
            SiteMapNode siteMapNode = SiteMap.CurrentNode;
            if (siteMapNode != null)
                Title = siteMapNode.Title;
        }
    }
}
